
package com.campus.common;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data @AllArgsConstructor @NoArgsConstructor
public class ApiResponse<T> {
  private int code;
  private String msg;
  private T data;
  public static <T> ApiResponse<T> ok(T data){ return new ApiResponse<>(200,"success",data); }
  public static <T> ApiResponse<T> fail(String msg){ return new ApiResponse<>(500,msg,null); }
}
